LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

JNIHELPER_SOURCE_PATH = engine/jnihelp
ENGINEBASE_SOURCE_PATH = engine
ENGINE_SOURCE_PATH = engine/android
PLATFORM_SOURCE_PATH = platform/android
VIDEO_SOURCE_PATH = video/gles2
INPUT_SOURCE_PATH = input/impl
FONT_SOURCE_PATH = font
MATH_SOURCE_PATH = math
DEBUGGER_SOURCE_PATH = debugger
LOGGER_SOURCE_PATH = logger
THREAD_SOURCE_PATH = thread
LOADER_SOURCE_PATH = loader
FILE_SOURCE_PATH = file
FILE_ZLIB_SOURCE_PATH = file/zlib
AUDIO_SOURCE_PATH = audio
IMAGE_SOURCE_PATH = image
PARTICLE_SOURCE_PATH = particle
SCHEDULER_SOURCE_PATH = scheduler
SOCKET_SOURCE_PATH = socket
PUGIXML_SOURCE_PATH = pugixml
MANAGER_SOURCE_PATH = manager
UNITS_SOURCE_PATH = units

LOCAL_MODULE    	:= libeasy2d

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../deps/freetype/include	\
			 $(LOCAL_PATH)/../deps/openal/include

LOCAL_DEFAULT_CPP_EXTENSION := cpp 
LOCAL_CFLAGS		:= -O2 -DANDROID=1
LOCAL_LDLIBS		:= -llog -lz -landroid -lEGL -lGLESv2
LOCAL_STATIC_LIBRARIES	:= android_native_app_glue libfreetype libopenal
LOCAL_SRC_FILES 	:= \
				$(PLATFORM_SOURCE_PATH)/Platform.cpp	\
				$(MATH_SOURCE_PATH)/gamemath.cpp	 \
				$(VIDEO_SOURCE_PATH)/Transform.cpp	\
				$(VIDEO_SOURCE_PATH)/GLES2Texture.cpp	\
				$(VIDEO_SOURCE_PATH)/GLES2Sprite.cpp	\
				$(VIDEO_SOURCE_PATH)/GLES2Shader.cpp	\
				$(VIDEO_SOURCE_PATH)/GLES2Video.cpp	 \
				$(INPUT_SOURCE_PATH)/Input.cpp	 \
				$(JNIHELPER_SOURCE_PATH)/JniHelper.cpp	 \
				$(ENGINEBASE_SOURCE_PATH)/EngineBase.cpp	 \
				$(ENGINE_SOURCE_PATH)/Engine.cpp	 \
				$(FILE_ZLIB_SOURCE_PATH)/ioapi.c	 \
				$(FILE_ZLIB_SOURCE_PATH)/zip.c		\
				$(FILE_ZLIB_SOURCE_PATH)/unzip.c	\
				$(FILE_SOURCE_PATH)/FileSystem.cpp	\
				$(FONT_SOURCE_PATH)/freetypefont/font.cpp		\
				$(AUDIO_SOURCE_PATH)/decoder/stb_vorbis.c	\
				$(AUDIO_SOURCE_PATH)/decoder/AudioDecoder.cpp	\
				$(AUDIO_SOURCE_PATH)/openal/Audio.cpp	\
				$(DEBUGGER_SOURCE_PATH)/Profiler.cpp	\
				$(LOGGER_SOURCE_PATH)/Logger.cpp	\
				$(THREAD_SOURCE_PATH)/Mutex.cpp	\
				$(THREAD_SOURCE_PATH)/Cond.cpp	\
				$(THREAD_SOURCE_PATH)/Thread.cpp	\
				$(THREAD_SOURCE_PATH)/ThreadTaskQueue.cpp	\
				$(IMAGE_SOURCE_PATH)/decoder/stb_image.cpp	\
				$(IMAGE_SOURCE_PATH)/decoder/etc1.cpp	\
				$(IMAGE_SOURCE_PATH)/decoder/etc1_decoder.cpp	\
				$(IMAGE_SOURCE_PATH)/decoder/dds_decoder.cpp	\
				$(IMAGE_SOURCE_PATH)/decoder/pvr_decoder.cpp	\
				$(IMAGE_SOURCE_PATH)/decoder/ImageDecoder.cpp	\
				$(IMAGE_SOURCE_PATH)/Image.cpp	\
				$(LOADER_SOURCE_PATH)/ResourceLoader.cpp	\
				$(LOADER_SOURCE_PATH)/LoadTask.cpp	\
				$(LOADER_SOURCE_PATH)/LoadFontTask.cpp	\
				$(LOADER_SOURCE_PATH)/LoadImageTask.cpp	\
				$(PARTICLE_SOURCE_PATH)/ParticleSystem.cpp	\
				$(SCHEDULER_SOURCE_PATH)/Clock.cpp	\
				$(SCHEDULER_SOURCE_PATH)/Scheduler.cpp	\
				$(PUGIXML_SOURCE_PATH)/pugixml.cpp	\
				$(MANAGER_SOURCE_PATH)/TextureMgr.cpp	\
				$(MANAGER_SOURCE_PATH)/SoundMgr.cpp	\
				$(UNITS_SOURCE_PATH)/base64.cpp		\
				$(UNITS_SOURCE_PATH)/Properties.cpp		\
				
				



#include $(BUILD_SHARED_LIBRARY)
include $(BUILD_STATIC_LIBRARY)

$(call import-module,android/native_app_glue)

